package com.jet.merchant.domain.dto;

import com.jet.core.annotation.Mobile;
import com.jet.core.annotation.Password;
import com.jet.core.model.bo.CreateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

@Data
@ApiModel
public class AccountDto implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 角色
     */
    @ApiModelProperty(value = "角色", required = true)
    @NotBlank(message = "角色权限不能为空")
    private String roleId;

    /**
     * 所属门店
     */
    @ApiModelProperty("所属门店")
    private long storeNo;

    @ApiModelProperty(value = "所属门店", required = true)
    @NotEmpty(message = "所属门店不能为空")
    private List<Long> storeNos;

    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "手机号不能为空")
    @Mobile
    private String phone;

    @ApiModelProperty("邮箱")
    @Email
    private String email;

    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空", groups = CreateGroup.class)
    @Password
    private String password;

    @ApiModelProperty("开放平台id")
    private String openId;
}
